#include<bits/stdc++.h>
using namespace std;

bool istriangle(int a, int b, int c)
{
    return a + b > c && a + c > b && b + c > a;
}

int main()
{
    int t;
    cin >> t;
th:
    while (t--)
    {
        vector<int> arr(6);
        for (int i = 0; i < 6; i++)
            cin >> arr[i];
        sort(arr.begin(), arr.end());
        do
        {
            if (istriangle(arr[0], arr[1], arr[2]) && istriangle(arr[3], arr[4], arr[5]))
            {
                cout << "Yes" << endl;
                goto th;
            }
        } while (next_permutation(arr.begin(), arr.end()));
        cout << "No" << endl;
    }
    return 0;
}